﻿#pragma once
#include "BinaryTreeNode.h"

class BinarySearchTree
{
public:
    BinarySearchTree();
    ~BinarySearchTree();

    BinaryTreeNode* find(int value);
    BinaryTreeNode* add(int value);
    void remove(int value);

    BinaryTreeNode* leftRotate(BinaryTreeNode* head);
    BinaryTreeNode* rightRotate(BinaryTreeNode* head);

    BinaryTreeNode* getRoot() { return root; }

private:
    BinaryTreeNode* root;
};